
<link rel="stylesheet" type="text/css" href="../addons/jy_seckill/css/swiper.min.css">
<link rel="stylesheet" type="text/css" href="../addons/jy_seckill/css/common.css?v=1">
<div class="fui-page seckill-page">
    <div class="fui-content">
        <input type="hidden" id="currenttime" value="{{currenttime}}" />
        <div class="swiper-container time-container">
            <div class="swiper-wrapper">
                <div ng-repeat="(key,time) in pagedata.times" class="swiper-slide time-slide time-slide-{{time.id}}" ng-class="{'current':time.status==0 || pagedata.timeindex==key}"  data-index="{{key}}">
                    <span class="time">{{time.time}}:00</span>
                    <span ng-if="time.status==1" class="text">               
                        抢购中
					</span>
					<span ng-if="time.status==0" class="text">               
                        即将开始
					</span> 
					<span ng-if="time.status!=1 && time.status!=0" class="text">               
                        已开抢
					</span> 
                </div>
            </div>
         </div>
        <div class="swiper-container adv-container" style="margin:0;">
            <div class="swiper-wrapper">           
                <div ng-repeat="adv in pagedata.advs" class="swiper-slide adv-slide" style="width:100%;padding:0">
                    <a ng-click="access_json(adv.link)">
                        <img src="{{tomedia(adv.thumb)}}"/>
                    </a>
                </div>
				<div ng-if="!pagedata.advs ||  pagedata.advs.length<1" class="swiper-slide adv-slide" style="padding:0;width:100%">
                    <a>
                        <img src="../addons/jy_seckill/css/hdp01.jpg"/>
                    </a>
                </div>
            </div>
        </div>
        <div ng-if="pagedata.rooms!='' && pagedata.rooms!=null" class="swiper-container room-container">
            <div class="swiper-wrapper">
                <a ng-repeat="room in pagedata.rooms" class="external swiper-slide room-slide" style="padding:0.5rem 0" ng-class="{'selected':pagedata.roomid==room.id}" ng-click="tool.get_list('jy_seckill/room//roomid='+room.id+'&timeid='+pagedata.timeid,true);pagedata.roomid=room.id">
                    {{room.title}}
                </a>
            </div>
        </div>
        <div ng-if="pagedata.roomid" class="swiper-container goods-container">
            <div class="swiper-wrapper">
                <div  class="swiper-slide goods-slide">
					<div class="fui-list-group time-group-{{pagedata.times[pagedata.timeindex].id}}" style="margin-top:0px">
						<div class="fui-list-group-title red">						   
							 <span ng-if="pagedata.times[pagedata.timeindex].status!=-1" class="timer" ng-init="tool.time_down(pagedata.times[pagedata.timeindex].rest_time)">
								  {{pagedata.times[pagedata.timeindex].status==0?'距开始':'距结束'}} <span class="time-hour">{{pagedata.times[pagedata.timeindex].rest_time.hour}}</span>:<span class="time-min">{{pagedata.times[pagedata.timeindex].rest_time.minute}}</span>:<span class="time-sec">{{pagedata.times[pagedata.timeindex].rest_time.second}}</span>
							 </span>
							<div ng-if="pagedata.times[pagedata.timeindex].status==-1">本时间段已结束，请留意下次秒杀~</div>
							<div ng-if="pagedata.times[pagedata.timeindex].status==1">抢购中 先下单先得哦</div>
							<div ng-if="pagedata.times[pagedata.timeindex].status==0">即将开始 先下单先得哦</div>
						</div>
					</div>
                </div>               
            </div>
        </div>		
        <div ng-repeat="g in pagedata.list" class='fui-list align-start' style="padding-top:0.5rem">
            <div class='fui-list-media'>
               <a ng-click="access_json('jy_weishop/goods.detail//id='+g.goodsid)"><img src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}" /></a>
            </div>
            <div class='fui-list-inner'>
                <a class='text' ng-click="access_json('jy_weishop/goods.detail//id='+g.goodsid)">{{g.title}}</a>
                <div class="info">
                     <span class="button">
						<a ng-if="pagedata.times[pagedata.timeindex].status!=1" href="javascript:" ng-click="access_json('jy_weishop/goods.detail//id='+g.goodsid)" class="jylabel jylabel-red active" style="padding:0.2rem 0.6rem;border-radius:1rem;font-weight:400">等待抢购</a>
						<a ng-if="pagedata.times[pagedata.timeindex].status==1 && g.percent>=100" href="javascript:"  ng-click="access_json('jy_weishop/goods.detail//id='+g.goodsid)" class="jylabel jylabel-red active" style="padding:0.2rem 0.6rem;border-radius:1rem;font-weight:400">已抢空</a>
						<a ng-if="pagedata.times[pagedata.timeindex].status==1 && g.percent<100" href="javascript:" ng-click="post({'goodsid':g.goodsid},'jy_weishop/goods.detail/addtocart/')" class="jylabel jylabel-red active" style="padding:0.2rem 0.6rem;border-radius:1rem;font-weight:400">加入购物车</a>
                     </span>
                    <div class="price">&yen;{{g.price}} <span class="delete">原价：&yen;{{g.oldprice}}</span></div>
                </div>
                <div class="info info1">
					<span ng-if="pagedata.times[pagedata.timeindex].status==1" class="process-text" style="float: left;font-size:0.55rem;margin-top:0.1rem">已售 {{g.percent}}%</span>
					<span ng-if="pagedata.times[pagedata.timeindex].status==1" class="progress" style="float: left;margin-top:0.35rem;margin-bottom:0.25rem;width: 6rem;height: 0.5rem;border-radius: .5rem;overflow: hidden;">
						<div class="progress-bar" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="100" style="width: {{g.percent || 1}}%;background-color:red;"><span class="sr-only">60% Complete</span></div>
					</span>
                    
                </div>
            </div>
        </div>
		<div ng-if="!pagedata.list || pagedata.list.length<1" class='content-empty' style="margin-top:0">
			<i class='icon icon-xinxi'></i><br/>当前时间段没有任何秒杀商品
		</div>
		<div ng-if="!pagedata.list || pagedata.list.length<1" class="content-empty" style="margin-top:1rem;">
			<a href="javascript:;" ng-click="access_json(pagedata.current_plugin+'/index/')" class='btn btn-sm btn-danger-o external' style="border-radius: 100px;width:  7rem;font-size: .75rem">去首页逛逛吧</a>
		</div>
		<div ng-if="pagedata.list.length>0" class="content-empty" style="margin-top:1rem;">
			<a href="javascript:;" ng-click="access_json('jy_weishop/member.cart/')" class='btn btn-sm btn-danger-o external' style="border-radius: 100px;width:  7rem;font-size: .75rem"><span ng-if="pagedata.cartnums>0" class="badge" style="top:-0.8rem;left:5rem;position: absolute;">{{pagedata.cartnums}}</span>看看购物车</a>
		</div>
    </div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script>
scope.tool.get_list('jy_seckill/room//roomid='+scope.pagedata.roomid+'&timeid='+scope.pagedata.timeid,true);
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>